package com.promise.jokerdream.ui.components

import android.content.Context
import android.view.View
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionContext
import androidx.compose.ui.platform.ComposeView
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalView

/**
 * PM BottomSheetDialog
 * 使用 BottomSheetDialogWrapper 的便捷封装
 */
@Composable
fun pmBottomSheetDialog(
    theme: Int = 0,
    topRadius: Float = 16f,
    backgroundColor: Int = 0xFFFFFFFF.toInt(),
    onDismiss: (() -> Unit)? = null
): BottomSheetDialogWrapper {
    val context = LocalContext.current
    val composeView = LocalView.current
    val wrapper = BottomSheetDialogWrapper(composeView, context, theme, topRadius, backgroundColor, onDismiss)
    return wrapper
}
